//Ta Duc Viet
//In kim tu thap
#include <iostream>
#include <iomanip>
using namespace std;
void print_pyramid ( int height);
int main(){
	int height;
	cout << "This program prints a 'pyramid' shape of a specified height on the screen.";
	do{
		cout << "Pick another height (must be between 1 and 30): ";
		cin >> height;
	} while ( height < 0 || height > 30);
	print_pyramid ( height);
	system("pause");
	return 0;
}
void print_pyramid ( int height){
	int star = 2;
	for ( int i = height; i > 0; i--){
		cout.width ( i);
		for ( int t = 0; t < star; t++){
			cout << "*";
		}
		cout << endl;
		star = star + 2;
	}
}
